var cafeFreeReceiceBeerURL = window.location.href;
var URLsplit = cafeFreeReceiceBeerURL.split("=")[1].split("&")[0];
// console.log(URLsplit);
user(URLsplit);
function user(URLsplit) {
    var sessionId = URLsplit;
    $.post("http://www.brandt-beer.com/app/appuser/getAppUser",
        {SESSION_ID:sessionId},
        function (data) {
        var datas = data.data;
        document.getElementById("headPortrait").src=datas.LOGO_IMG;
        document.getElementById("name").innerText=datas.NICKNAME;
        // console.log(datas)
    });
    $.post("http://www.brandt-beer.com/app/goods/getGiveGoodsNum",
        {SHOP_TYPE:0,SESSION_ID:sessionId},
        function (data) {
            // console.log(data.data);
            var datasum = data.data;
            document.getElementById("quantityBeerAvailable").innerText=datasum.GIVE_NUM;
        })
}
function receive() {
    window.location.href="./receive.html?session="+URLsplit;
}
// 获取用户信息
// /app/appuser/getAppUser
// 3.12.	公众号用户免费领酒数量
// /app/goods/getGiveGoodsNum     SHOP_TYPE